package com.itheima.jinjie.lianxi;

public class Undergraduate extends Student {
    String specialty;

    public Undergraduate(String name, int age, String gegree, String specialty) {
        super(name, age, gegree);
        this.specialty = specialty;
    }

    public void setSpecialty(String specialty) {
        this.specialty = specialty;
    }

    public String getSpecialty() {

        return specialty;
    }

    public void show(){
        System.out.println(name+","+age+","+gegree+","+specialty);
    }
}
